-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New contact method #15330
New contact method #15330
Conversation
…o addedLogin errors.
Not overdue, waiting for a reverted PR to be merged back into main |
Can I do anything to help unblock you here @cristipaval ? |
@marcaaron this is ready for a new review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Nice work. Gonna merge this so we can keep charging!
addressed I think @marcochavezf let us know if there are additional comments
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/marcaaron in version: 1.2.99-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.2.99-6 🚀
|
*/ | ||
deleteContactMethod() { | ||
if (!_.isEmpty(lodashGet(this.props.loginList, [this.getContactMethod(), 'errorFields'], {}))) { | ||
User.deleteContactMethod(this.getContactMethod()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up! There is a regression #17343 from this PR because deleteContactMethod expects two parameters to clear the local error optimistically.
Navigation.navigate(ROUTES.SETTINGS_CONTACT_METHODS); | ||
return; | ||
} | ||
User.addNewContactMethodAndNavigate(this.state.login, this.state.password); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't trim the login value, which caused this bug here
This PR caused a bug #18207. The submitted login should have the sms domain appended in case of a phone number (we could have achieved this using |
@@ -169,7 +184,8 @@ class ContactMethodDetailsPage extends Component { | |||
isVisible={this.state.isDeleteModalOpen} | |||
danger | |||
/> | |||
{!loginData.validatedDate && ( | |||
{isFailedAddContactMethod && <DotIndicatorMessage style={[styles.mh5]} messages={ErrorUtils.getLatestErrorField(loginData, 'addedLogin')} type="error" />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello everyone, vertical margin was not added with DotIndicatorMessage
causing this issue.
Issue: #17847
Title: No margin above Remove button in Contact method Detail screen
Steps To Reproduce:
- Go to settings -> Profile -> Contact methods
- Click New contact method -> Add any email which is already on Expensify.
- Click Add button
- Go to detail screen of that same email
- You can notice that there is no margin above Remove button
{this.props.translate('common.pleaseEnterEmailOrPhoneNumber')} | ||
</Text> | ||
<View style={[styles.ph5, styles.mb6]}> | ||
<TextInput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 This has caused a small regression in #18003
Since this is an email/phone TextInput, it should've had the email
keyboard type
}, | ||
}]; | ||
|
||
API.write('AddNewContactMethod', {partnerUserID: contactMethod, password}, {optimisticData, successData, failureData}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not lowercasing the contactMethod
caused issues when people started testing mixed-case contact methods - #19080
Details
cc @Beamanator
Fixed Issues
$ #15318
Tests and QA Steps
Offline tests
Screen.Recording.2023-03-30.at.13.42.04.mov
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
mobile.chrome.mov
Mobile Web - Safari
mobile.safari.mov
Desktop
desktop.mov
iOS
ios.native.mov
Android
Screen.Recording.2023-03-29.at.18.33.12.mov